/*
 * Login.java
 *
 * Created on August 21, 2007, 12:13 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package timeitj.faces;

import java.io.IOException;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author wallner
 */
public class Login {
    
    /** Creates a new instance of Login */
    public Login() {}
    
    // Stolen from http://groundside.com/blog/DuncanMills.php and used with Love
    
    public String loginAction() throws IOException, ServletException {
        
        ExternalContext ectx   = FacesContext.getCurrentInstance().getExternalContext();
        HttpServletRequest request   = (HttpServletRequest)ectx.getRequest();
        HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
        RequestDispatcher dispatcher = request.getRequestDispatcher("/pages/loginProxy.jspx");
        dispatcher.forward(request,response);
        return null;
}

}
